home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-08-31 | 2.8 KB | 115 lines |
- SOURCES = t*.m
- TARGETS = t*.g
- .SUFFIXES:
- .SUFFIXES: .g .m
- # (for finding reg problems)
- # ECFLAGS = -C -z -Tprimitive=2 -Ttempreg=1
- ECFLAGS = -gt -gd
- EMDIR=/scratch/eric/emerald/
- EC = ${EMDIR}/Language/Compiler/ec
- RUNEC = ${EMDIR}/bin/runec
- .m.g:
- ${EC} -C ${ECFLAGS} $*.m
-
- all:
- @make -k ${MFLAGS} `echo ${SOURCES} | sed -e 's/\\.m/.g/g'`
-
- links:
- csh -c "ln -s /r/bas$(EMDIR)/Language/ExecTests/{*.{m,input,output},Makefile,testshell,t} ."
-
- test: all dotest
-
- dotest:
- @-for name in ${TARGETS} ; do \
- bn=`basename $$name .g` ; \
- if [ -r $$bn.input ] ; then \
- if [ -r $$bn.output ] ; then \
- ${RUNEC} -i $$bn < $$bn.input > $$bn.output.bak ; \
- if cmp -s $$bn.output $$bn.output.bak ; then \
- echo "Test \"$$bn\" starting ... completed successfully." ; \
- rm $$bn.output.bak ; \
- else \
- echo "Test \"$$bn\" starting ... failed." ; \
- diff -c $$bn.output $$bn.output.bak ; \
- fi ; \
- else \
- ${RUNEC} -i $$bn < $$bn.input ; \
- fi ; \
- else \
- if [ -r $$bn.output ] ; then \
- ${RUNEC} -i $$bn > $$bn.output.bak ; \
- if cmp -s $$bn.output $$bn.output.bak ; then \
- echo "Test \"$$bn\" starting ... completed successfully." ; \
- rm $$bn.output.bak ; \
- else \
- echo "Test \"$$bn\" starting ... failed." ; \
- diff -c $$bn.output $$bn.output.bak ; \
- fi ; \
- else \
- ${RUNEC} -i $$bn ; \
- fi ; \
- fi ; \
- true ; \
- done
- print:
- enscript -2 -r -k *.m
-
- tar:
- @echo "Making Tests.tar"
- tar cf Tests.tar ${SOURCES} Makefile
-
- sources:
- @echo "${SOURCES}"
-
- clean:
- @rm -f core *.bak *.ckp *.[0-9].s *.[0-9][0-9].s \
- *.[0-9].o *.[0-9][0-9].o *.g
-
- GREP = fgrep -i
- G = import
-
- grep:
- @-${GREP} -n -e '${G}' ${SOURCES} | \
- sed 's/^\([^:]*\):\([^:]*\):/"\1", line \2:/'
- @sleep 1
-
- depend:
- @echo "Doing .m files"
- @grep -w 'import' ${SOURCES} | \
- grep -v 'Builtins' | \
- sed 's/:[ ]*import[ ][ ]*\([^ ]*\).*/: \1.g/' | \
- sed 's/\.m/.g/' | \
- tr 'A-Z' 'a-z' | \
- awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
- else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
- else rec = rec " " $$2 } } \
- END { print rec } ' > makedep
- @echo "Finishing up"
- @echo '$$r makedep' >>eddep
- @echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >>eddep
- @echo '$$r makedep' >>eddep
- @echo 'w' >>eddep
- @cp Makefile Makefile.bak
- @ed - Makefile < eddep
- @rm eddep makedep
-
- # DO NOT DELETE THIS LINE -- make depend uses it
-
- taaaa.g: runtest.g
- tabstracttype.g: runtest.g
- tarray.g: runtest.g
- tboolean.g: runtest.g
- tcharacter.g: runtest.g
- tconform.g: runtest.g
- thairy.g: runtest.g
- thiho.g: runtest.g
- tinstream.g: runtest.g
- tinteger.g: runtest.g
- tmove.g: runtest.g
- tnode.g: runtest.g
- toutstream.g: runtest.g
- trecord.g: runtest.g
- tstring.g: runtest.g
- ttime.g: runtest.g
- tvector.g: runtest.g
-